﻿using Covid.Shared.Dtos;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Threading.Tasks;


namespace Covid.Server.Entities
{

    /// <summary>
    /// 员工实体
    /// </summary>
    public class Employee
    {
        /// <summary>
        /// 员工ID
        /// </summary>
        public int Id { get; set; }

        /// <summary>
        /// 部门ID
        /// </summary>
        public int DepartmentId { get; set; }


        [Display(Name ="工号")]
        [Required(ErrorMessage = "{0}是必填项")]
        [MaxLength(50, ErrorMessage = "{0}的长度不能超过{1}")]
        public string No { get; set; }


        [Display(Name = "姓名")]
        [Required(ErrorMessage = "{0}是必填项")]
        [MaxLength(50, ErrorMessage = "{0}的长度不能超过{1}")]
        public string  Name { get; set; }


        [Display(Name = "照片地址")]
        [MaxLength(50, ErrorMessage = "{0}的长度不能超过{1}")]
        public string  PictureUrl { get; set; }


        [Display(Name = "日期")]
        public DateTime BirthDate { get; set; }

        [Display(Name = "性别")]
        public Gender Gender { get; set; }


    }
}
